<script lang="ts" setup>
import axios from 'axios';
import { onMounted } from 'vue';
// 发送请求获取数据
const getData = async () => {
  const res = await axios.get('http://hmajax.itheima.net/api/news')
  console.log(res.data.data)
}

   onMounted(() => {
    console.log('onMounted', Date.now())
    getData()
  })
</script>